Connect
AutomatR.PostgreSQL.Database.Connect
The "Connect" activity in AutomatR facilitates the connection to a specified PostgreSQL database. This activity is crucial for establishing a connection that can be utilized by subsequent database-related activities.
Properties
Name | Description |
---|---|
Input | |
Source | Specify the source path for the PostgreSQL database. String variables containing the source path. |
Port | Specify the port number for the PostgreSQL database. Integer variables containing the port number. |
DataBase Name | Specify the name of the PostgreSQL database to connect with. String variables containing the database name. |
UserName | Provide the username for the PostgreSQL database. String variables containing the username. |
Password | Provide a password for the specified username to connect to the PostgreSQL database. String variables containing the password. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Connect" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Connection | Outputs the result as an NpgsqlConnection variable, which can be used for further database activities. Variables of type NpgsqlConnection to store the connection. |
How to use:
- Drag and drop the "Connect" activity onto the workflow.
- Configure the properties by specifying the source path, port, database name, and optionally, the username and password for the PostgreSQL database.
- Optionally, configure the delay.
- Execute the workflow to establish a connection to the specified PostgreSQL database.
Example: Consider an example where the "Connect" activity is used to connect to a PostgreSQL database:
Connect:
Delay: 2
Source: "localhost"
Port: 5432
DataBase Name: "mydatabase"
UserName: "user"
Password: "password"
Connection: myDBConnection
In this example, the activity establishes a connection to the "mydatabase" PostgreSQL database on the local machine with a 2-second delay. The connection information, including the username and password, is provided, and the result is stored in the NpgsqlConnection variable "myDBConnection" for further database-related activities.